
module.exports = {
  verbose: true,
  // "globals": {
  //   "_reportData_": []
  // },
  // testEnvironment: "jsdom",
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/$1',
    '^~/(.*)$': '<rootDir>/$1',
    '^@@/(.*)$': '<rootDir>/$1',
    //'^vue$': 'vue/dist/vue.common.js',
  },
  setupFiles: ['<rootDir>/test/environment.setup.js'],
  setupFilesAfterEnv: ['<rootDir>/test/mock.setup.js'],
  moduleFileExtensions: [
    'js',
    'json'
  ],
  transform: {
    "^.+\\.js$": [
      "babel-jest",
      {
        "presets": ["@babel/preset-env"],
        "plugins": ["@babel/plugin-transform-runtime"]
      }
    ]
    //'^.+\\.js$': 'babel-jest',
    //'.*\\.(vue)$': 'vue-jest'
  },
  //setupFiles:['<rootDir>/node_modules/teld-component-proxy/lib/teld-ui.mobile.js'],

  transformIgnorePatterns: ["<rootDir>/node_modules/(?!(@teld/component-proxy|@teld/api-proxy))"],
  // transformIgnorePatterns: ["<rootDir>/node_modules/(?!teld-component-proxy)"],
  collectCoverage: true,
  collectCoverageFrom: [
    //'<rootDir>/components/**/*.vue',
    '<rootDir>/utils/**/*.js',
    '!<rootDir>/utils/**/report.js',
    '!<rootDir>/utils/**/rewrite_app_setting.js'
  ],
  //"setupFiles": ["jest-canvas-mock"],
  //"globalSetup":"<rootDir>/test/unit/script/setup.js",
  //"globalTeardown":"<rootDir>/test/unit/script/teardown.js",
  //  "runner": "jest-electron/runner",
  // "testEnvironment": "jest-electron/environment",
  //"testEnvironment": "<rootDir>/test/unit/script/CustomEnvironment.js",
  // "reporters": [
  //   "default",
  //   ["<rootDir>/test/unit/script/ddp-reporter.js", {"banana": "yes", "pineapple": "no"}]
  // ]
}
